package cn.kgc.dao.impl;

import cn.kgc.dao.BaseDao;
import cn.kgc.dao.ProjectDao;
import cn.kgc.entity.Project;

import java.util.List;

public class ProjectImpl extends BaseDao implements ProjectDao {

    @Override
    public List<Project> search() {
        String sql = "SELECT AVG(score) score,course FROM school_project GROUP BY course";
        List<Project> projectList = this.query(Project.class,sql);
        return projectList;
    }
}
